package com.glut.gultguy.mq;


import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Producer {

@Autowired
RocketMQTemplate rocketMQTemplate;

    public  void sendMessage(String goodsId) {
        System.out.println("MQQ:");
            rocketMQTemplate.convertAndSend("java1234-rocketmq", goodsId);
    }
}
